005 screens and navigation
赫尔 我们回来了。
Hale We're back.
现在我们要看看导航。
Now we're going to be looking at navigation.
因此,我们知道我们已经有了一个屏幕,我们已经有了主屏幕,但这还不足以导航。
So to jump right in we know we've got one screen already we've got our main screen but that's not enough to navigate.
我们至少还需要一个屏幕,所以我右键单击“显示”并点击“新建”,它会在这里弹出一个非常空的、无标题的窗口。
We're going to need at least one more screen so I right clicked on display and hit new and it just pops up very empty very untitled window here.
我将右键单击并进行显示设置,并使这一设置与另一设置不同。
And I'm going to right click and take display settings and to keep this one distinct from the other one.
我要设置这个,然后给它一个粉红色的非常难看的粉红色背景。
I'm just going to set this one up and I'm going to give it a pink very ugly pink background.
所以现在我们有一些东西可以告诉我们我们在不同的屏幕上。
So now we've got something that will tell us that we're on a different screen.
现在我们如何到达另一个屏幕。
Now how do we get to this other screen.
好吧,我们将来到这里的对象,如果我们向下滚动以显示导航,我们就必须返回到我们已经返回的位置。
Well we're going to come up here to objects and if we scroll down to display navigation we've got go to we've got returned to.
我们有显示列表选择器。
We've got display lists selector.
好吧,让我们从一个简单的开始,到某人那里画出它。
Well let's start off with a simple go to some one to draw that right here.
正如您所知,它看起来与任何其他按钮完全相同。
And this as you can tell looks exactly like any other button.
当我双击它时,我得到了一些可以设置的参数,在显示设置下,这是我放置目的地的地方。
When I double click on it I've got some parameters that I can set and under display settings this is where I put my destination.
所以现在我没有可用的目的地,因为我的新屏幕尚未保存。
So right now I don't have a destination available because my new screen hasn't been saved yet.
所以让我继续保存它,我也将其称为 S2 屏幕。
So let me go ahead and save that and I'll just call it S2 for screen too.
所以现在,当我返回到并选择显示时,我有了 s2,因此我可以保存它,或者我可以转到此处的标签,我只需输入两个,以便我知道该按钮的用途。
So now when I go back in my go to and select display now I have my s2 so I can save that or I can go over here to the label and I'm just going to type in two so that I know what that buttons for.
它告诉我导航到此页面。
It's telling me to navigate to this page.
同样,我可以复制粘贴到此显示屏中的按钮,然后我可以将该名称更改为 Main,因为这将带我们返回主屏幕,并且在“常规”下我可以将显示屏更改为主屏幕。
Likewise I could copy that button pasted into this display and then I could change that name to Main because that's going to take us back to the main screen and under General I can change the display to main.
那会起作用的。
That'll work.
所以应用并点击。
So apply and hit.
好的。
OK.
我可以做的其他事情是在对象下我可以去显示导航,我可以单击返回,我可以将按钮放在此处。
Something else that I could do is under objects I could go to display navigation and I could click on return to and I could drop of button in right here.
双击它并给它一个标签,我将其称为“上一个”。
Double click on that and give it a label and I'll just call it previous.
所以这将使我们返回到这个屏幕。
So this will return us to this screen.
但是,如果我们有其他五个屏幕,它们都将直接导航到屏幕,然后点击上一个屏幕,我们就会立即返回到首先发送给我们的屏幕中的任何一个。
But if we had five other screens that would all navigate directly to screen to hitting previous would send us right back to whichever one of those screens sent to us here in the first place.
我们现在要查看的另一件事将在对象下,然后在显示导航下。
The other thing that we will look at right now will be under objects and right back under display navigation.
我们已经有了显示列表选择器。
And we've got our display lists selector.
所以让我在这里把它画出来。
So let me draw that out here.
我们已经让您知道了最多五种不同的状态,现在我们只有两个屏幕,所以让我们将其减少到两个,状态零将用于我们的主屏幕,状态一将是四个状态二。
We've got you know up to five different states right now we only have two screens so let's just drop that down to two and state zero will be for our main screen and state one will be four state two.
当我选择此处的显示时,我也将继续,只是对于标题,我将告诉它使用每个页面的显示名称。
And as I select the display up here I am also going to go ahead and just for the caption I'm just going to tell it to use the display name of each of those pages.
所以让我们点击“确定”。
So let's hit OK.
现在我们有一些不同的导航项目可以尝试。
And now we've got a few different navigation items that we can experiment with.
因此,让我们继续测试我们的应用程序并告诉它保存橙色屏幕更改。
So let's go ahead and test our application and tell it to save orange screen changes.
现在,那只小仓鼠将在他的轮子上尽可能快地跑来跑去。
So now that little hamster is going to run around on his wheel just as fast as he can.
这个东西最终会弹出并在主屏幕上打开,然后我们实际上应该能够以几种不同的方式在屏幕 1 和屏幕 2 之间来回切换。
And this thing is eventually going to pop up should be open to the main screen and then we should actually be able to go back and forth between screen 1 and screen 2 in a couple of different ways.
因此,让我们继续单击两个按钮。
So let's go ahead and click the two button.
果然,我们花了两个屏幕,我们在这里有了一个小指示器,我们也可以使用它在页面之间来回跳转。
Sure enough it took us to screen two and we've got our little indicator over here that we can use also to jump back and forth between pages.
我只是通过使用向上和向下箭头并按回车键来做到这一点,所以如果我的箭头指向缅因州并按回车键,它会让我们回来,或者我也可以使用我们之前的按钮,这会让我们回来。
I did that just by using the arrows up and down and hitting enter so if my arrow up to Maine and hit enter it brings us back or I could also use our previous button and that will bring us back.
因此,我们有它。
So there we have it.
我们有几种不同的导航方式。
We've got a few different ways that we can navigate.
事实上,这将超出我们在这些事情上设置几英里的距离。
And really that's going to be more than we'll need to set up a few miles on these things.
希望我们能在这门课程中做到这一点。
Wish we could do it in this course.
我试图让这成为可能,但罗克韦尔只是没有让它逃离那里,我们将继续结束本次讲座,因为这就是我们这次在屏幕之间导航的全部内容,现在你知道如何创建新的屏幕上,你知道如何到达那里。
And I tried to make that possible but Rockwell just wasn't having it hit escape out of there and we'll go ahead and wrap up this lecture because that's what we were all about this time navigating between screens now you know how to create new screens and you know how to get there.
那么下次见
So see you next time